package com.atguigu.gmall.mapper;

import com.atguigu.gmall.bean.TrafficUvCt;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface TrafficStatsMapper {

    @Select("select ch,sum(uv_ct) uv_ct\n" +
            "from dws_traffic_vc_ch_ar_is_new_page_view_window partition par#{date} group by ch order by uv_ct desc limit #{limit} ")
    List<TrafficUvCt> selectChUvCt(Integer date, Integer limit);
}
